Release 10.1A: OpenEdge Development:
Progress 4GL Reference


TIMEZONE function

Returns an integer representing the time zone offset from Coordinated Universal Time (UTC), in minutes. Use this function together with the STRING function to produce the time in hours, minutes, and seconds.

Note: Coordinated Universal Time (UTC) is the current universal standard for time. Local time zone values are relative to UTC. For example, Eastern Standard Time is UTC–05:00.

Syntax

TIMEZONE ( [ datetime-tz-expression | char-expression ] ) 

datetime-tz-expression

An expression whose value is a DATETIME-TZ.

char-expression

A character expression representing the time zone offset. The format of the expression must be +HH:MM.

If the TIMEZONE function has no arguments, it returns the client or server machine that serves as the time source for applications running during the OpenEdge session (specified by the TIME-SOURCE attribute).

Examples

Following is an example of using the TIMEZONE function:

DEF VAR v-dt-tz AS DATETIME-TZ INITIAL 2002-05-05T07:15:03.002-05:00. 
DEF VAR v-tz AS INTEGER. 
v-tz = TIMEZONE(“+08:00”).  /* v-tz = 480 */ 
v-tz = TIMEZONE (v-dt-tz).  /* v-tz = -300 */ 

See also

DATETIME function, DATETIME-TZ function, ETIME function, MTIME function, NOW function, TIME function, TIME-SOURCE attribute


Copyright © 2005 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095